#pragma once

#include "OCMain/FileUtil.h"
#include "OCNetCDF/NetCDFReader.h"
#include "OCServer/ServerUtil.h"
#include "OCMain/Date.h"

using namespace OCPP;

class WeatherUtil
{
public:
	static StringVector listFileWithExt(String path, String ext);
	static StringVector listSubDir(String path);
	static void removeDir(String path);
	static std::shared_ptr<sqlite3pp::database> getOrCreateSqlite(String fileName);
	static bool exist(std::shared_ptr<sqlite3pp::database> db, String name);
	static bool insert(std::shared_ptr<sqlite3pp::database> db, String name);
	static bool insert(std::shared_ptr<sqlite3pp::database> db, String name, String time);

	static void createDBClient(String fileName, String name);

	static String getDateUTC(int before = 0);
	static const String formatTime(time_t t);
	static const time_t toTimeTick(String timeStr);
};
